// 用户管理中心 - 所有用户数据都在这里统一管理
// 状态定义: 0-停用, 1-启用
export const userData = [
  {
    id: 1,
    username: 'admin',
    name: '张三',
    email: 'admin@example.com',
    role: '超级管理员',
    status: 1,
    lastLogin: '2024-01-15 10:30:00',
    avatar: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face',
    userType: 'super_admin',
    organization: '总部',
    phone: '13800138000',
    department: '技术部',
    position: '技术总监'
  },
  {
    id: 2,
    username: 'pm001',
    name: '李四',
    email: 'pm001@example.com',
    role: '项目经理',
    status: 1,
    lastLogin: '2024-01-14 15:20:00',
    avatar: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face',
    userType: 'org_admin',
    organization: '北京分公司',
    phone: '13800138001',
    department: '项目部',
    position: '项目经理'
  },
  {
    id: 3,
    username: 'dev001',
    name: '王五',
    email: 'dev001@example.com',
    role: '开发工程师',
    status: 1,
    lastLogin: '2024-01-15 09:15:00',
    avatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=150&h=150&fit=crop&crop=face',
    userType: 'normal_user',
    organization: '总部',
    phone: '13800138002',
    department: '开发部',
    position: '高级开发工程师'
  },
  {
    id: 4,
    username: 'test001',
    name: '赵六',
    email: 'test001@example.com',
    role: '测试工程师',
    status: 1,
    lastLogin: '2024-01-13 14:45:00',
    avatar: null,
    userType: 'normal_user',
    organization: '上海分公司',
    phone: '13800138003',
    department: '测试部',
    position: '测试工程师'
  },
  {
    id: 5,
    username: 'product001',
    name: '钱七',
    email: 'product001@example.com',
    role: '产品经理',
    status: 0,
    lastLogin: '2024-01-10 11:20:00',
    avatar: null,
    userType: 'normal_user',
    organization: '总部',
    phone: '13800138004',
    department: '产品部',
    position: '产品经理'
  }
];

// 生成更多测试数据
for (let i = 6; i <= 50; i++) {
  const roles = ['超级管理员', '项目经理', '开发工程师', '测试工程师', '产品经理'];
  const statuses = [0, 1];
  const userTypes: Array<'super_admin' | 'org_admin' | 'normal_user'> = ['super_admin', 'org_admin', 'normal_user'];
  const organizations = ['总部', '北京分公司', '上海分公司', '广州分公司'];
  const departments = ['技术部', '开发部', '测试部', '产品部', '项目部'];
  const positions = ['总监', '经理', '工程师', '专员'];
  
  userData.push({
    id: i,
    username: `user${i}`,
    name: `测试用户${i}`,
    email: `user${i}@example.com`,
    role: roles[Math.floor(Math.random() * roles.length)],
    status: statuses[Math.floor(Math.random() * statuses.length)],
    lastLogin: '从未登录',
    avatar: null,
    userType: userTypes[Math.floor(Math.random() * userTypes.length)],
    organization: organizations[Math.floor(Math.random() * organizations.length)],
    phone: `13800138${i.toString().padStart(3, '0')}`,
    department: departments[Math.floor(Math.random() * departments.length)],
    position: positions[Math.floor(Math.random() * positions.length)]
  });
}